package cn.com.xky.springbootjpa.dao;

import cn.com.xky.springbootjpa.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by EKEYXIA on 2017/8/14.
 */
public interface IUserDao extends JpaRepository<User,Long>{

    public User findUserById(Integer id);

    public User findByNameAndAge(String name,Integer age);

    public List<User> findFirst10ByName(String name);

    public List<User> findTop10ByName(String name);

    public User findUserByNameAndAge(String name,Integer age);


}
